package com.vay.de.dang.online.ui;

import android.content.Intent;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.vay.de.dang.online.util.VnPfReader;
import com.vay.de.dang.online.util.VnHandler;

public class BaseActivity extends AppCompatActivity {

    protected VnPfReader mPf;
    protected BaseActivity mActivity;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mActivity = this;
        mPf = VnPfReader.instance();
    }

    public void showHint(int resId) {
        VnHandler.showText(mActivity, getString(resId));
    }

    public void showHint(String hint) {
        VnHandler.showText(hint);
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    protected final String findString(Intent data, String key) {
        Bundle bundle = data.getExtras();
        return bundle != null ? bundle.getString(key) : null;
    }
}
